﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KinConquer
{
    public class Counter
    {
        private UInt32 mMin, mMax;
        private UInt32 current;

        public Counter(UInt32 min)
        {
            this.mMin = min;
            this.mMax = UInt32.MaxValue;
            this.current = this.mMin;
        }

        public Counter(UInt32 min, UInt32 max)
        {
            this.mMin = min;
            this.mMax = max;
            this.current = this.mMin;
        }

        public UInt32 NextVal
        {
            get
            {
                current++;
                if (current >= this.mMax)
                    current = mMin;
                return current;
            }
        }
    }
}
